<template>
  <view class="remark-detail">
    <uni-popup ref="popup" background-color="#fff" :is-mask-click="false" @change="change">
      <view class="popup-content">
        <view class="data-content">
          <view>
            <uni-list>
              <uni-list-item :title="data" v-for="(data, index) in dataList" :key="index" />
            </uni-list>
          
          </view>
        </view>
        <view class="bottom">
          <button class="login-btn cu-btn block lg" @click="close">关闭</button>
        </view>
      </view>
    </uni-popup>
  </view>
</template>

<script>
  export default {
    name: 'RemarkDetail',
    components: {},
    props: {
      dataList: {
        type: Array,
        default() {
          return [];
        },
      },
    },
    data() {
      return {};
    },
    mounted() {
      this.$nextTick(() => {
        this.$refs.popup.open('center');
      });
    },
    created() {
    },
    methods: {
      close() {
        this.$refs.popup.close();
      },
      change(e) {
        if (!e.show) {
          setTimeout(() => {
            this.$emit('close');
          }, 1000);
        }
        console.log(e);
      },
    },
  };
</script>

<style lang="less" scoped>
  .remark-detail {
    &, * {
      box-sizing: border-box;
    }
    .popup-content {
      height: 80vh;
      width: 90vw;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      .bottom {
        padding: 10px;
      }
      .data-content {
        flex: 1;
        overflow: hidden;
        padding: 15px 10px;
        > view {
          height: 100%;
          overflow: auto;
        }
      }
    }
  }
</style>
